﻿using POCOS;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace GUI.Models.ModelArt
{
    public class MArticle
    {

        public int Id { get; set; }
        [Required(ErrorMessage = "The start date is required")]
        [Display(Name = "تاريخ المقالة")]
        [DisplayFormat(DataFormatString = "{0:D}")]
        public DateTime CreationDate { get; set; }
        public DateTime UpdateDate { get; set; }
        [Display(Name = "الموضوع")]
        public string Subjet { get; set; }
        [Display(Name = "العنوان")]
        public string Title { get; set; }
        public bool IsActive { get; set; }
        [Display(Name = "المقالة")]
        [UIHint("tinymce_jquery_full"), AllowHtml]
        public string ArticleContenent { get; set; }

        public Byte[] ImageBytes { get; set; }


        public string ImageUrl { get; set; }
        public Auteur Auteur { get; set; }
        public virtual int AuteurId { get; set; }





    }



    public class ModelTheme
    {
        public int Id { get; set; }
        public string Subjects { get; set; }

        public Article article { get; set; }
        public virtual int ArticleId { get; set; }
    }


    public class ArticleResult
    {
        public ArticleResult()
        {
            ModelArticle = new MArticle();
            ModelTheme = new ModelTheme();
        }
        public MArticle ModelArticle { get; set; }
        public ModelTheme ModelTheme { get; set; }
    
    }


}